package com.example.mymessagequeue;

import com.example.mymessagequeue.common.GlobalVariable;
import com.example.mymessagequeue.mqserver.BrokerServer;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;

import java.io.IOException;

@SpringBootApplication
public class MyMessageQueueApplication {

    public static ConfigurableApplicationContext context;



    public static void main(String[] args) throws IOException {
        context = SpringApplication.run(MyMessageQueueApplication.class, args);
        BrokerServer brokerServer = new BrokerServer(7772);
        GlobalVariable.brokerServer = brokerServer;
        brokerServer.start();
    }
}
